package cn.kooki.app.duobao.util;

import android.annotation.TargetApi;
import android.app.Activity;
import android.os.Build;

/**
 * Created by xiong on 2015/11/25.
 */
public class StatusBarCompat {
    private static final int INVALID_VAL = -1;
    @TargetApi(Build.VERSION_CODES.LOLLIPOP)
    public static void compat(Activity activity, int statusColor){

        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP)
        {
            if (statusColor != INVALID_VAL)
            {
                activity.getWindow().setStatusBarColor(statusColor);
            }
            return;
        }
    }
}
